#include "Element.h"
#include <GL/gl.h>
#include <stdio.h>
#include <stdlib.h>

using namespace std;

Element::~Element()
{
}

void Element::render()
{
    glPushMatrix();

    glMultMatrixf(_m);

    renderInLocalFrame();
    glPopMatrix();
}

void Element::setPosition(float x, float y, float z)
{
    _m[12] = x;
    _m[13] = y;
    _m[14] = z;
}

void Element::setTransMatrix(float *m)
{
    // printf("setTransMatrix: ");
    for (int i = 0; i < 4 * 4; ++i)
    {
	_m[i] = m[i];
	//printf("%.5f, ", _m[i]);
    }
    //printf("\n");
}

